
var cityRes = [
	{
		name: "A",
		arr: ["安阳","安庆","安康"]
	},
	{
		name: "B",
		arr: ["北京","保定"]
	},
	{
		name: "C",
		arr: ["苍南县"]
	},
	{
		name: "D",
		arr: ["洞头县"]
	},
	{
		name: "L",
		arr: ["鹿城区","龙湾区","乐成市"]
	},
	{
		name: "O",
		arr: ["瓯海县"]
	},
	{
		name: "P",
		arr: ["平阳县"],
	},
	{
		name: "R",
		arr: ["鹿城区","龙湾区","乐成市"]
	},
	{
		name: "S",
		arr: ["鹿城区","龙湾区","乐成市"]
	},
	{
		name: "T",
		arr: ["鹿城区","龙湾区","乐成市"]
	}
];
var cityResTit = ["A","B","C","D","L","O","P","R","S","T"];

var City = {
	init: function(){
		$("#cityList").html(this.getCityHtml(cityRes));
		$(function(){
			$(".slider-content").height($(window).height() - $("header").outerHeight() - $(".city_top").outerHeight());
			$('#slider').sliderNav({items: cityResTit, arrows: false});
			var s1 = new iScroll("content",{hScrollbar: false,vScrollbar: false});
		});
	},
	getCityHtml: function(arr){
		var html = 	'';
		for (var i = 0; i < cityRes.length; i ++){
			html += '<li id="' + cityRes[i].name + '"><a name="' + cityRes[i].name + '" class="title">' + cityRes[i].name + '</a>' + 
					'	<ul>';
			for (var j = 0; j < cityRes[i].arr.length; j ++){
			html += '		<li><a>' + cityRes[i].arr[j] + '</a></li>';
			}
			html +=	'	</ul>' + 
					'</li>';
		}		
		return html;	
	}
}


